package com.bigflexlib.utils.priority
{
	
	
	import flash.events.EventDispatcher;




	public class AbstractPrioritizable extends EventDispatcher implements IPrioritizable
	{
		
		private var _priority:uint;
		[Bindable("priorityChanged")]
		public function get priority( ):uint
		{
			return _priority;
		}
		public function set priority( v:uint ):void
		{
			if ( _priority == v )
				return;
				
			_priority = v;

			dispatchEvent( new PriorityEvent( PriorityEvent.PRIORITY_CHANGED ) );

		}		
		
		
		public function AbstractPrioritizable( priority:uint=5 )
		{
			_priority = priority;
		}
		
		
		
	}
	
}